/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.una.accidentmanagement.bo;

import br.com.una.accidentmanagement.model.ActionTicket;
import br.com.una.accidentmanagement.model.Ticket;
import br.com.una.accidentmanagement.util.DatabaseConnection;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;

/**
 *
 * @author santosmgbh
 */
public class ActionController {
        
    public List<ActionTicket> getAllActions(){
        EntityManager em = DatabaseConnection.instance().getManager();
        TypedQuery<ActionTicket> query = em.createQuery("SELECT a FROM ActionTicket a", ActionTicket.class);        
        return query.getResultList();
    }
    
}
